use "replication data.dta", clear  


************************
*Descriptive statistics*
************************

* Table A1: Summary statistics of main variables
*PART I
eststo clear 
eststo: quietly estpost sum article_all article_gov article_opp drawer_all paid_circulation
esttab, cells("mean(fmt(2)) sd(fmt(2)) min(fmt(1)) max(fmt(1)) count(fmt(0))") compress nonumbers ///
 title(Table A1: Summary statistics of main variables) varwidth(66) noobs ///
 coeflabels(article_all "Number of articles (all scandals)" ///
 article_gov "Number of articles (only government scandals)" ///
 article_opp "Number of articles (only opposition scandals)" ///
 drawer_all "Avg. time between transgressions and scandal coverage (months)" ///
 paid_circulation "Paid newspaper circulation (in 1,000 copies)")
*PART II
eststo clear 
eststo: quietly estpost sum nat_cycle v15 lifts_restr_nat sim_over if newspaper == 1
esttab, cells("mean(fmt(2)) sd(fmt(2)) min(fmt(1)) max(fmt(1)) count(fmt(0))") compress nonumbers ///
 varwidth(66) noobs nomtitles ///
 coeflabels(nat_cycle "Election cycle (months)" v15 "Government popularity (index)" /// 
 lifts_restr_nat "Number of criminal investigations into members of parliament" ///
 sim_over "Number of simultaneously covered scandals")


*Figure 1: Scandal coverage and the election cycle
sort nat_cycle, stable
by nat_cycle: egen mean_article=mean(article_all)
by nat_cycle: egen mean_front=mean(front_all)
by nat_cycle: egen mean_char=mean(char_all)
twoway (scatter mean_article nat_cycle) (lfit mean_article nat_cycle), ///
 ylabel(, labsize(large)) xlabel(, labsize(large)) scheme(s2mono) legend(off) ///
 ytitle("Average number of articles", size(large))  yscale(titlegap(*15)) xscale(titlegap(*15)) ///
 xtitle("-1 x (Months until election)", size(large)) graphregion(color(white))


*Figure A1: Autocorrelation functions of the monthly number of articles
ac article_all if newspaper_text == "Bild", lags(24) scheme(s2mono) graphregion(color(white)) ///
 ytitle("Autocorrelations" " ", size(medlarge)) xtitle(, size(medlarge)) note(" ") ///
 xlabel(, labsize(medlarge)) ylabel(-0.2(0.2)0.4, labsize(medlarge))
ac article_all if newspaper_text == "FAZ", lags(24) scheme(s2mono) graphregion(color(white)) ///
 ytitle("Autocorrelations" " ", size(medlarge)) xtitle(, size(medlarge)) note(" ") ///
 xlabel(, labsize(medlarge)) ylabel(-0.2(0.2)0.4, labsize(medlarge))
ac article_all if newspaper_text == "Handelsblatt", lags(24) scheme(s2mono) graphregion(color(white)) ///
 ytitle("Autocorrelations" " ", size(medlarge)) xtitle(, size(medlarge)) note(" ") ///
 xlabel(, labsize(medlarge)) ylabel(-0.2(0.2)0.4, labsize(medlarge))
ac article_all if newspaper_text == "SZ", lags(24) scheme(s2mono) graphregion(color(white)) ///
 ytitle("Autocorrelations" " ", size(medlarge)) xtitle(, size(medlarge)) note(" ") ///
 xlabel(, labsize(medlarge)) ylabel(-0.2(0.2)0.4, labsize(medlarge))
ac article_all if newspaper_text == "TAZ", lags(24) scheme(s2mono) graphregion(color(white)) ///
 ytitle("Autocorrelations" " ", size(medlarge)) xtitle(, size(medlarge)) note(" ") ///
 xlabel(, labsize(medlarge)) ylabel(-0.2(0.2)0.4, labsize(medlarge))
ac article_all if newspaper_text == "Welt", lags(24) scheme(s2mono) graphregion(color(white)) ///
 ytitle("Autocorrelations" " ", size(medlarge)) xtitle(, size(medlarge)) note(" ") ///
 xlabel(, labsize(medlarge)) ylabel(-0.2(0.2)0.4, labsize(medlarge))



***********************************************************
*Main effect: Does election cycle affect scandal coverage?*
***********************************************************

global notes1="Dependent variable: number of articles."
global notes2="Negative binomial estimates, based on 720 observations (6 newspapers, 120 months between January 2005 and December 2014), using Stata's glm command."
global notes2d="OLS estimates, based on 720 observations (6 newspapers, 120 months between January 2005 and December 2014)."
global notes2b="Negative binomial estimates, based on 120 observations, using Stata’s glm command."
global notes2e="Arellano-Bond linear dynamic panel-data estimates, based on 6 newspapers and up to 120 months between January 2005 and December 2014, using Stata’s xtabond command."
global notes3="All models include a constant, as well as newspaper, government, and month fixed effects."
global notes3b="All models include a constant, as well as government and month fixed effects."
global notes4="Heteroscedasticity-robust standard errors in parentheses."
global notes4_nb="Robust standard errors based on the Huber-White variance estimator in parentheses."
global notes5="* p<0.10, ** p<0.05, *** p<0.01"

* Table 1: Scandal coverage and the election cycle
eststo clear
quietly eststo: glm article_all nat_cycle gov* month_fe* newsp_fe* ///
 , family(nbinomial 1) link(log) vce(robust)
quietly eststo: glm article_gov nat_cycle gov* month_fe* newsp_fe* ///
 , family(nbinomial 1) link(log) vce(robust)
quietly eststo: glm article_opp nat_cycle gov* month_fe* newsp_fe* ///
 , family(nbinomial 1) link(log) vce(robust)
quietly eststo: glm article_all nat_cycle gov* month_fe* newsp_fe* ///
 v15 lifts_restr_nat sim_over, family(nbinomial 1) link(log) vce(robust)
quietly eststo: glm article_gov nat_cycle gov* month_fe* newsp_fe* ///
 v15 lifts_restr_nat sim_over, family(nbinomial 1) link(log) vce(robust)
quietly eststo: glm article_opp nat_cycle gov* month_fe* newsp_fe* ///
 v15 lifts_restr_nat sim_over, family(nbinomial 1) link(log) vce(robust)
esttab, star(* 0.10 ** 0.05 *** 0.01) se compress ///
 modelwidth(11) keep(nat_cycle v15 lifts_restr_nat sim_over) noobs nonotes varwidth(30) ///
 mtitles("All scandals" "Government scandals" "Opposition scandals" ///
 "All scandals" "Government scandals" "Opposition scandals") /// 
 coeflabels(nat_cycle "Election cycle" v15 "Government popularity" ///
 lifts_restr_nat "Number of criminal investigations" ///
 sim_over "Number of simultaneously covered scandals") ///
 title(Table 1: Scandal coverage and the election cycle) ///
 addnotes("Notes: $notes1 $notes2 $notes3 $notes4_nb" "$notes5")

 
 
 
* Table A3: Scandal coverage and the election cycle (alternative functional forms of the election cycle variable)
gen nat_cycle_sq = (nat_cycle^2)*-1
gen nat_cycle_log = (log(-1*nat_cycle))*-1
gen nat_cycle_pol3 = nat_cycle + nat_cycle^2 + nat_cycle^3

eststo clear
quietly eststo: glm article_all nat_cycle_sq gov* month_fe* newsp_fe* ///
 v15 lifts_restr_nat sim_over, family(nbinomial 1) link(log) vce(robust)
quietly eststo: glm article_all nat_cycle_pol3 gov* month_fe* newsp_fe* ///
 v15 lifts_restr_nat sim_over, family(nbinomial 1) link(log) vce(robust)
quietly eststo: glm article_all nat_cycle_log gov* month_fe* newsp_fe* ///
 v15 lifts_restr_nat sim_over, family(nbinomial 1) link(log) vce(robust)
esttab, star(* 0.10 ** 0.05 *** 0.01) se compress ///
 modelwidth(11) keep(nat_cycle_sq nat_cycle_pol3 nat_cycle_log ///
 v15 lifts_restr_nat sim_over) ///
 order(nat_cycle_sq nat_cycle_pol3 nat_cycle_log) noobs nonotes varwidth(30) ///
 mtitles("All scandals" "All scandals" "All scandals") ///
 coeflabels(nat_cycle_sq "-squared" nat_cycle_pol3 "-third polynomial" ///
 nat_cycle_log "-logarithmic" v15 "Government popularity" ///
 lifts_restr_nat "Number of criminal investigations" ///
 sim_over "Number of simultaneously covered scandals") ///
 title(Table A3: Scandal coverage and the election cycle (alternative functional forms of the election cycle variable)) ///
 addnotes("Notes: $notes1 $notes2 $notes3 $notes4_nb" "$notes5")
 
 
 
 
* Table A4: Scandal coverage and the election cycle (different outcome variables)
eststo clear
quietly eststo: glm char_all nat_cycle gov* month_fe* newsp_fe* ///
 v15 lifts_restr_nat sim_over, family(nbinomial 1) link(log) vce(robust)
quietly eststo: glm front_all nat_cycle gov* month_fe* newsp_fe* ///
 v15 lifts_restr_nat sim_over, family(nbinomial 1) link(log) vce(robust)
quietly eststo: glm article_photo nat_cycle gov* month_fe* newsp_fe* ///
 v15 lifts_restr_nat sim_over, family(nbinomial 1) link(log) vce(robust)
quietly eststo: glm article_no_photo nat_cycle gov* month_fe* newsp_fe* ///
 v15 lifts_restr_nat sim_over, family(nbinomial 1) link(log) vce(robust)
esttab, star(* 0.10 ** 0.05 *** 0.01) se compress ///
 modelwidth(14) keep(nat_cycle v15 lifts_restr_nat sim_over) noobs nonotes varwidth(36) ///
 mtitles("All scandals, number of characters" ///
 "All scandals, number of front-page articles" ///
 "All scandals, only articles with a photo"  ///
 "All scandals, only articles without a photo") /// 
 coeflabels(nat_cycle "Election cycle" v15 "Government popularity" ///
 lifts_restr_nat "Number of criminal investigations" ///
 sim_over "Number of simultaneously covered scandals") ///
 title(Table A4: Scandal coverage and the election cycle (different outcome variables)) ///
 addnotes("Notes: The column headers denote the dependent variable. $notes2 $notes3 $notes4_nb" "$notes5") 


 
 
* Table A5: Scandal coverage and the election cycle (excluding outliers)
eststo clear
quietly eststo: glm article_all nat_cycle gov* month_fe* newsp_fe* ///
 v15 lifts_restr_nat sim_over if article_all < 26, family(nbinomial 1) link(log) vce(robust)
quietly eststo: glm article_all nat_cycle gov* month_fe* newsp_fe* ///
 v15 lifts_restr_nat sim_over if article_all < 27, family(nbinomial 1) link(log) vce(robust)
esttab, star(* 0.10 ** 0.05 *** 0.01) se compress ///
 modelwidth(25) keep(nat_cycle v15 lifts_restr_nat sim_over) noobs nonotes varwidth(30) ///
 mtitles("All scandals (excluding the two most severe outliers in coverage)" "All scandals (excluding the most severe outlier in coverage)") /// 
 scalars("N Observations") ///
 coeflabels(nat_cycle "Election cycle" v15 "Government popularity" ///
 lifts_restr_nat "Number of criminal investigations" ///
 sim_over "Number of simultaneously covered scandals") ///
 title(Table A5: Scandal coverage and the election cycle (excluding outliers)) ///
 addnotes("Notes: $notes1 Negative binomial estimates, using Stata’s glm command. $notes3 $notes4_nb" "$notes5")
 

 
* Table A6: Scandal coverage and the election cycle (using only full election cycles)
global notes2h="Negative binomial estimates, based on 576 observations (6 newspapers, 96 months between October 2005 and September 2013), using Stata’s glm command."
eststo clear
quietly eststo: glm article_all nat_cycle gov* month_fe* newsp_fe* ///
 v15 lifts_restr_nat sim_over if tm > tm(2005m9) & tm < tm(2013m10), ///
 family(nbinomial 1) link(log) vce(robust)
quietly eststo: glm article_gov nat_cycle gov* month_fe* newsp_fe* ///
 v15 lifts_restr_nat sim_over if tm > tm(2005m9) & tm < tm(2013m10), ///
 family(nbinomial 1) link(log) vce(robust)
quietly eststo: glm article_opp nat_cycle gov* month_fe* newsp_fe* ///
 v15 lifts_restr_nat sim_over if tm > tm(2005m9) & tm < tm(2013m10), ///
 family(nbinomial 1) link(log) vce(robust)
esttab, star(* 0.10 ** 0.05 *** 0.01) se compress ///
 modelwidth(11) keep(nat_cycle v15 lifts_restr_nat sim_over) noobs nonotes varwidth(30) ///
 mtitles("All scandals" "Government scandals" "Opposition scandals") /// 
 coeflabels(nat_cycle "Election cycle" v15 "Government popularity" ///
 lifts_restr_nat "Number of criminal investigations" ///
 sim_over "Number of simultaneously covered scandals") ///
 title(Table A6: Scandal coverage and the election cycle (using only full election cycles)) ///
 addnotes("Notes: $notes1 $notes2h $notes3 $notes4_nb" "$notes5")
  
 
* Table A7: Poisson autoregression estimates --> See "PAR model.R".
 
* Table A8: Scandal coverage and the election cycle (dynamic panel-data estimates)
eststo clear
quietly eststo: xtabond article_all nat_cycle gov* month_fe* ///
 v15 lifts_restr_nat sim_over, lags(1) artests(2)
quietly eststo: xtabond article_all nat_cycle gov* month_fe* ///
 v15 lifts_restr_nat sim_over, lags(2) artests(2)
quietly eststo: xtabond article_all nat_cycle gov* month_fe* ///
 v15 lifts_restr_nat sim_over, lags(3) artests(2)
esttab, star(* 0.10 ** 0.05 *** 0.01) se compress ///
 scalars("N Observations") ///
 mtitles("All scandals" "All scandals" "All scandals") ///
 modelwidth(11) keep(nat_cycle v15 lifts_restr_nat sim_over *article_all*) ///
 order(nat_cycle v15 lifts_restr_nat sim_over *article_all*) noobs nonotes varwidth(30) ///
 coeflabels(nat_cycle "Election cycle" v15 "Government popularity" ///
 lifts_restr_nat "Number of criminal investigations" ///
 sim_over "Number of simultaneously covered scandals" ///
 L.article_all "Lag 1 (number of articles)" ///
 L2.article_all "Lag 2 (number of articles)" ///
 L3.article_all "Lag 3 (number of articles)") ///
 title(Table A8: Scandal coverage and the election cycle (dynamic panel-data estimates)) ///
 addnotes("Notes: $notes1 $notes2e $notes3 $notes4" "$notes5")
 


 
* Table A9: Scandal coverage and the election cycle (by newspaper)
eststo clear
quietly eststo: glm article_all nat_cycle gov* month_fe* newsp_fe* ///
 v15 lifts_restr_nat sim_over if newspaper == 1, family(nbinomial 1) link(log) vce(robust)
quietly eststo: glm article_all nat_cycle gov* month_fe* newsp_fe* ///
 v15 lifts_restr_nat sim_over if newspaper == 2, family(nbinomial 1) link(log) vce(robust)
quietly eststo: glm article_all nat_cycle gov* month_fe* newsp_fe* ///
 v15 lifts_restr_nat sim_over if newspaper == 3, family(nbinomial 1) link(log) vce(robust)
quietly eststo: glm article_all nat_cycle gov* month_fe* newsp_fe* ///
 v15 lifts_restr_nat sim_over if newspaper == 4, family(nbinomial 1) link(log) vce(robust)
quietly eststo: glm article_all nat_cycle gov* month_fe* newsp_fe* ///
 v15 lifts_restr_nat sim_over if newspaper == 5, family(nbinomial 1) link(log) vce(robust)
quietly eststo: glm article_all nat_cycle gov* month_fe* newsp_fe* ///
 v15 lifts_restr_nat sim_over if newspaper == 6, family(nbinomial 1) link(log) vce(robust)
esttab, star(* 0.10 ** 0.05 *** 0.01) se compress ///
 modelwidth(11) keep(nat_cycle v15 lifts_restr_nat sim_over) noobs nonotes varwidth(30) ///
 mtitles("Bild" "Frankfurter Allgemeine Zeitung" "Handelsblatt" ///
 "Süddeutsche Zeitung" "Die Tageszeitung" "Die Welt") /// 
 coeflabels(nat_cycle "Election cycle" v15 "Government popularity" ///
 lifts_restr_nat "Number of criminal investigations" ///
 sim_over "Number of simultaneously covered scandals") ///
 title(Table A9: Scandal coverage and the election cycle (by newspaper)) ///
 addnotes("Notes: $notes1 $notes2b $notes3b $notes4_nb" "$notes5")

 
 
* Table A10: Scandal coverage and the election cycle (by type of scandal)
global notes_type="We follow Hamel and Miller (2018) and Pereira and Waterbury (2018) and use four categories to determine the type of the scandal:"
global notes_fin="Financial scandals refer to monetary crimes that involve personal enrichment (e.g., tax evasion, corruption, illegal gifts)."
global notes_pol="Political scandals pertain to allegations of professional misconduct without personal enrichment (e.g., election fraud, misuse of campaign funds)."
global notes_sex="Sex scandals involve, for instance, sexual harassment, extramarital affairs, and pedophilia."
global notes_other="Other scandals refer to transgressions that do not fit in the other categories, including drug abuse, plagiarism, lying about the professional background, or false statements."
eststo clear
quietly eststo: glm article_fin nat_cycle gov* month_fe* newsp_fe* ///
 v15 lifts_restr_nat sim_over, family(nbinomial 1) link(log) vce(robust)
quietly eststo: glm article_pol nat_cycle gov* month_fe* newsp_fe* ///
 v15 lifts_restr_nat sim_over, family(nbinomial 1) link(log) vce(robust)
quietly eststo: glm article_sex nat_cycle gov* month_fe* newsp_fe* ///
 v15 lifts_restr_nat sim_over, family(nbinomial 1) link(log) vce(robust)
quietly eststo: glm article_other nat_cycle gov* month_fe* newsp_fe* ///
 v15 lifts_restr_nat sim_over, family(nbinomial 1) link(log) vce(robust)
esttab, star(* 0.10 ** 0.05 *** 0.01) se compress ///
 modelwidth(11) keep(nat_cycle v15 lifts_restr_nat sim_over) noobs nonotes varwidth(30) ///
 mtitles("Financial scandals" "Political scandals" "Sex scandals" ///
 "Other scandals") /// 
 coeflabels(nat_cycle "Election cycle" v15 "Government popularity" ///
 lifts_restr_nat "Number of criminal investigations" ///
 sim_over "Number of simultaneously covered scandals") ///
 title(Table A10: Scandal coverage and the election cycle (by type of scandal)) ///
 addnotes("Notes: $notes1 $notes2 $notes3 $notes_type $notes_fin $notes_pol $notes_sex $notes_other $notes4_nb" "$notes5")
 
 

****************************************
*Mechanism: Recency of transgressions*
****************************************
global notes2c="OLS estimates, based on 309 observations (6 newspapers and up to 120 months; newspaper-months without any scandal coverage are excluded from the regressions)."
global notes6="Dependent variable: monthly average of the length of time between transgressions and scandal coverage."

*Table 2: Recency of transgressions and the election cycle
eststo clear
quietly eststo: ivreg2 drawer_all nat_cycle gov* month_fe* newsp_fe*, robust
quietly eststo: ivreg2 drawer_all nat_cycle gov* month_fe* newsp_fe* ///
 v15 lifts_restr_nat sim_over, robust
esttab, star(* 0.10 ** 0.05 *** 0.01) se compress modelwidth(14) ///
 keep(nat_cycle v15 lifts_restr_nat sim_over) noobs nomtitles ///
 scalars("r2_a Adj. R-square") nonotes ///
 title(Table 2: Recency of transgressions and the election cycle) varwidth(30) /// 
 coeflabels(nat_cycle "Election cycle" v15 "Government popularity" ///
 lifts_restr_nat "Number of criminal investigations" ///
 sim_over "Number of simultaneously covered scandals") ///
 addnotes("Notes: $notes6 $notes2c $notes3 $notes4" "$notes5")


*Table 3: Newspaper circulation and scandal coverage
gen td=dofm(tm)
gen tq=qofd(td)
gen quarter = quarter(td)
quietly tabulate quarter, generate(quarter_fe)

collapse (mean) paid_circulation nat_cycle newsp_fe* quarter_fe*  ///
 v15 lifts_restr_nat sim_over drawer_all (sum) article_all (first) gov*, by(newspaper tq)
 
gen cycle_article_all = article_all*nat_cycle
gen cycle_drawer_all = nat_cycle*drawer_all

global notes2d="OLS estimates, based on 6 newspapers and up to 40 quarters (newspaper-quarters without any scandal coverage are excluded from Model 2)."
global notes7="Dependent variable: paid newspaper circulation (in 1,000 copies)."
global notes_rec="The article counts refer to all scandals. Here, the recency of the transgression is defined as the quarterly average of the length of time between transgressions and scandal coverage."
global notes3c="All models include a constant, as well as newspaper, government, and quarter fixed effects."

eststo clear
quietly eststo: ivreg2 paid_circulation article_all nat_cycle gov* quarter_fe* newsp_fe* ///
 v15 lifts_restr_nat sim_over, robust
quietly eststo: ivreg2 paid_circulation article_all nat_cycle cycle_article_all ///
 gov* quarter_fe* newsp_fe* v15 lifts_restr_nat sim_over, robust
quietly eststo: ivreg2 paid_circulation drawer_all nat_cycle gov* quarter_fe* newsp_fe* ///
 v15 lifts_restr_nat sim_over, robust
quietly eststo: ivreg2 paid_circulation drawer_all nat_cycle cycle_drawer_all ///
 gov* quarter_fe* newsp_fe* v15 lifts_restr_nat sim_over, robust
esttab, star(* 0.10 ** 0.05 *** 0.01) se compress modelwidth(14) nomtitles ///
 keep(article_all drawer_all nat_cycle cycle_article_all cycle_drawer_all ///
 v15 lifts_restr_nat sim_over) noobs ///
 order(article_all cycle_article_all drawer_all cycle_drawer_all) ///
 scalars("r2_a Adj. R-square" "N Observations") nonotes ///
 title(Table 3: Newspaper circulation and scandal coverage) varwidth(30) /// 
 coeflabels(article_all "Number of articles" ///
 cycle_article_all "Number of articles x election cycle" ///
 drawer_all "Recency of transgression" ///
 cycle_drawer_all "Recency of transgression x election cycle" ///
 nat_cycle "Election cycle" v15 "Government popularity" ///
 lifts_restr_nat "Number of criminal investigations" ///
 sim_over "Number of simultaneously covered scandals") ///
 addnotes("Notes: $notes7 $notes2d $notes_rec $notes3c $notes4" "$notes5")




 
 
 
